#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(dedup, 1.3.0, Aigui.Liu@gmail.com)
AC_CONFIG_SRCDIR([src/dedup.c])
AC_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(dedup, 1.3.0)

# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O

# Checks for libraries.
# FIXME: Replace `main' with a function in `-lz':
AC_CHECK_LIB([z], [inflate])
AC_CHECK_LIB([z], [deflate])
AC_PROG_RANLIB

# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h getopt.h zlib.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_LSTAT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memset mkdir strdup])

AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
